<template>
  <a-modal
    title="操作"
    :visible="visible"
    :confirm-loading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
    okText="确定"
    :closable="false"
    :maskClosable="false"
    :destroyOnClose="true">

    <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
      <a-form-item label="地址">
        <a-input placeholder="请输入地址" v-decorator="['url', { rules: [{ required: true}] }]" />
      </a-form-item>
      <a-form-item label="标题">
        <a-input placeholder="请输入标题" v-decorator="['title', {}]" />
      </a-form-item>
    </a-form>


  </a-modal>
</template>
<script>
export default {
    name:"SysUserModel",
    data() {
        return {
            visible: false,
            confirmLoading: false,
            form: this.$form.createForm(this),

        };
    },
    methods: {
        init(record) {
            if(record){

            }
            this.visible = true;
        },
        handleOk(e) {
            let that=this;
            this.form.validateFields((err, values) => {
                if (!err) {
                    console.log('Received values of form: ', values);
                    that.visible = false;
                    that.$emit('ok');
                }
            });
        },
        handleCancel(e) {
            this.visible = false;
        },
    },
};
</script>
